package cn.jhz.learn.blog.dao.file;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import cn.jhz.learn.blog.po.file.BlogFile;
import cn.jhz.learn.blog.po.file.BlogFileContent;
import org.springframework.stereotype.Repository;

@Repository
public interface BlogFileMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(BlogFile record);

    int insertSelective(BlogFile record);

    BlogFile selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BlogFile record);

    int updateByPrimaryKey(BlogFile record);


	/*自定义*/
    int batchInsert(@Param("list") List<BlogFile> fileList);

    int batchInsertContent(@Param("list") List<BlogFileContent>fileList);

    List<BlogFileContent> selectContentBySignatureCode(@Param("list")List<String> signatureCodeList);

	List<BlogFile> selectBySignatureCode(@Param("list")List<String> signatureCodeList);

	@MapKey("id")
	Map<Integer, BlogFile> batchSelectByPrimaryKeys(@Param("list")List<Integer> ids);

//    BlogFileContent selectContentByPrimaryKey(@Param("id") Integer id);
//
//	int countStatusBySignatureCodeList(@Param("signatureCodes") List<String> signatureCodeList, @Param("status") Byte status);

}